import React from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';
import Information from './Information';
import CreatePosition from './Information/CreatePosition';
import PositionDetail from './Information/PositionDetail';
import RecruitmentDetail from './Information/RecruitmentDetail';
import Invitation from './Information/RecruitmentDetail/Invitation';
import Interview from './Interview';
import SendMessage from './Interview/SendMessage';
import Website from './Website';

const Recruitment: React.FC = () => {
  return (
    <Switch>
      <Route exact path="/recruitment" render={() => <Redirect to="/recruitment/information" />} />
      {/* 招聘信息 */}
      <Route path="/recruitment/information" exact component={Information} />
      {/* 创建职位 */}
      <Route path="/recruitment/information/createposition" exact component={CreatePosition} />
      {/* 职位详情 */}
      <Route path="/recruitment/information/positionDetail" exact component={PositionDetail} />
      {/* 招聘信息详情 */}
      <Route
        path="/recruitment/information/recruitmentDetail"
        exact
        component={RecruitmentDetail}
      />
      {/* 面试邀约 */}
      <Route
        path="/recruitment/information/recruitmentDetail/invitation"
        exact
        component={Invitation}
      />

      {/* 面试记录 */}
      <Route path="/recruitment/interview" exact component={Interview} />
      {/* 发送短信 */}
      <Route path="/recruitment/interview/sendMessage" exact component={SendMessage} />

      {/* 招聘信息详情 */}
      {/* 招聘网站 */}
      <Route component={Website} />
    </Switch>
  );
};

export default Recruitment;
